import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class SerializableIn {

	public static void main(String[] args) {
		Data data = null;
		FileInputStream fis;
		try {
			fis = new FileInputStream("C:\\tmp\\test.txt");
			ObjectInputStream ois = new ObjectInputStream(fis);
			data = (Data)ois.readObject();
		} catch (FileNotFoundException e1) {
			e1.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		System.out.println(data.toString());
	}
}
